package br.unesp.demac.bcc.soo.sistemaclarus.view;

import javax.swing.JFrame;

/**
 *
 * @author Evaldo
 */
public class JFramePrincipal extends javax.swing.JFrame {

    /** Creates new form JFramePrincipal */
    public JFramePrincipal() {
        initComponents();
        
        this.setExtendedState(JFrame.MAXIMIZED_BOTH);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlPrincipal = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        mnbMenu = new javax.swing.JMenuBar();
        mnCadastrar = new javax.swing.JMenu();
        mnitCadObra = new javax.swing.JMenuItem();
        mnitCadUsuario = new javax.swing.JMenuItem();
        mnAlterar = new javax.swing.JMenu();
        mnitAlterarObra = new javax.swing.JMenuItem();
        mnSobre = new javax.swing.JMenu();
        mnitSobreClarus = new javax.swing.JMenuItem();
        mnSair = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sistema Clarus");
        setBackground(new java.awt.Color(255, 255, 255));

        pnlPrincipal.setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setBackground(new java.awt.Color(255, 255, 255));
        jLabel1.setForeground(java.awt.Color.white);
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unesp/demac/bcc/soo/sistemaclarus/imagens/logo.png"))); // NOI18N

        javax.swing.GroupLayout pnlPrincipalLayout = new javax.swing.GroupLayout(pnlPrincipal);
        pnlPrincipal.setLayout(pnlPrincipalLayout);
        pnlPrincipalLayout.setHorizontalGroup(
            pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 632, Short.MAX_VALUE)
        );
        pnlPrincipalLayout.setVerticalGroup(
            pnlPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE)
        );

        mnCadastrar.setMnemonic('C');
        mnCadastrar.setText("Cadastrar");
        mnCadastrar.setPreferredSize(new java.awt.Dimension(100, 19));

        mnitCadObra.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unesp/demac/bcc/soo/sistemaclarus/imagens/icon_livro.gif"))); // NOI18N
        mnitCadObra.setMnemonic('O');
        mnitCadObra.setText("Obra");
        mnitCadObra.setPreferredSize(new java.awt.Dimension(100, 40));
        mnitCadObra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnitCadObraActionPerformed(evt);
            }
        });
        mnCadastrar.add(mnitCadObra);

        mnitCadUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unesp/demac/bcc/soo/sistemaclarus/imagens/icon_usuario.png"))); // NOI18N
        mnitCadUsuario.setMnemonic('U');
        mnitCadUsuario.setText("Usuário");
        mnitCadUsuario.setPreferredSize(new java.awt.Dimension(100, 40));
        mnitCadUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnitCadUsuarioActionPerformed(evt);
            }
        });
        mnCadastrar.add(mnitCadUsuario);

        mnbMenu.add(mnCadastrar);

        mnAlterar.setMnemonic('A');
        mnAlterar.setText("Alterar");
        mnAlterar.setPreferredSize(new java.awt.Dimension(103, 19));

        mnitAlterarObra.setMnemonic('O');
        mnitAlterarObra.setText("Obra");
        mnitAlterarObra.setPreferredSize(new java.awt.Dimension(103, 19));
        mnitAlterarObra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnitAlterarObraActionPerformed(evt);
            }
        });
        mnAlterar.add(mnitAlterarObra);

        mnbMenu.add(mnAlterar);

        mnSobre.setMnemonic('S');
        mnSobre.setText("Sobre");
        mnSobre.setPreferredSize(new java.awt.Dimension(103, 19));

        mnitSobreClarus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unesp/demac/bcc/soo/sistemaclarus/imagens/icon_Informacao.png"))); // NOI18N
        mnitSobreClarus.setText("Sobre o Clarus");
        mnitSobreClarus.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mnitSobreClarusActionPerformed(evt);
            }
        });
        mnSobre.add(mnitSobreClarus);

        mnbMenu.add(mnSobre);

        mnSair.setMnemonic('S');
        mnSair.setText("Sair");
        mnSair.setPreferredSize(new java.awt.Dimension(90, 19));
        mnSair.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                mnSairMouseClicked(evt);
            }
        });
        mnbMenu.add(mnSair);

        setJMenuBar(mnbMenu);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mnitCadObraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnitCadObraActionPerformed
        JFrame frmObra = new JFrameCadObras();
        frmObra.pack();
        frmObra.setVisible(true);
    }//GEN-LAST:event_mnitCadObraActionPerformed

    private void mnitCadUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnitCadUsuarioActionPerformed
        JFrame frmUsuario = new JFrameCadUsuario();
        frmUsuario.pack();
        frmUsuario.setVisible(true);
    }//GEN-LAST:event_mnitCadUsuarioActionPerformed

    private void mnitSobreClarusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnitSobreClarusActionPerformed
        
    }//GEN-LAST:event_mnitSobreClarusActionPerformed

    private void mnSairMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_mnSairMouseClicked
        dispose();
    }//GEN-LAST:event_mnSairMouseClicked

    private void mnitAlterarObraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mnitAlterarObraActionPerformed
        JFrame frmAlterObra = new JFrameAlteracaoObra();
        frmAlterObra.pack();
        frmAlterObra.setVisible(true);
    }//GEN-LAST:event_mnitAlterarObraActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new JFramePrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JMenu mnAlterar;
    private javax.swing.JMenu mnCadastrar;
    private javax.swing.JMenu mnSair;
    private javax.swing.JMenu mnSobre;
    private javax.swing.JMenuBar mnbMenu;
    private javax.swing.JMenuItem mnitAlterarObra;
    private javax.swing.JMenuItem mnitCadObra;
    private javax.swing.JMenuItem mnitCadUsuario;
    private javax.swing.JMenuItem mnitSobreClarus;
    private javax.swing.JPanel pnlPrincipal;
    // End of variables declaration//GEN-END:variables
}
